package com.xlhj.thymeleaf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author: lcj
 * @Date: 2020/11/9 11:49
 * @Description: Thymeleaf控制器
 * @Version: 0.0.1
 */
@Controller
@RequestMapping("/thymeleaf")
public class ThymeleafController {

    @GetMapping("/index")
    public String test(Model model) {
        model.addAttribute("name", "Hello Thymeleaf");
        return "index";
    }
}
